#ifndef _GameInfo
#define _GameInfo

#include <QtXml>

#include <QString>
#include <QMap>

#include "Card.h"
#include "Player.h"

class GameInfo
{
 // Game board (flop, turn and river)
 QMap<int,Card> board;

 int pot;

 // Etat de la partie
 int gameState;

 int smallBlind;
 int bigBlind;

 int currentPlayer;

 //Delete amountRaised in header and CPP source for useless
 int amountRaised;


 public:
  // Game Players
  map <int,Player> players;

  //Joueur gagnant la partie
  int winner;// 1= joueur1, 2= joueur 2

  GameInfo();
  GameInfo(const GameInfo & gameInfo);
  GameInfo & operator = (const GameInfo & gameInfo);

  void incrementGameState();

  QMap<int,Card> getBoardCards();
  map <int,Player> & getPlayers();
  Player & getPlayer(int numPlayer);
  int getPot();
  int getGameState();
  int getSmallBlind();
  int getBigBlind();
  int getCurrentPlayer();
  int getAmountRaised();
  QString getAmountRaisedQString();

  int getwinner(map <int,Player> &player);
  int getwinner();
  int getOtherCurrentPlayer();

  void setPlayers(map <int,Player> players);
  void setBoardCards(Card cardFlop1, Card cardFlop2, Card cardFlop3, Card cardTurn, Card cardRiver);
  void setPlayer(int numPlayer, Player player);
  void setPot(int _pot);
  void setGameState(int gameState);
  void setSmallBlind(int SmallBlind);
  void setBigBlind(int bigBlind);
  void setCurrentPlayer(int currentPlayer);
  void setAmountRaised(int amountRaised);

  void setWinner(int _winner);

  // Rename setBoardCard
  void setBoardCards(int k,Card c);
  QString toString();
  QString toXml();
};

#endif
